package com.landeqing.service.impl;

import com.landeqing.dao.impl.OrderAddressDaoImpl;
import com.landeqing.model.Address;
import com.landeqing.model.City;
import com.landeqing.model.Province;
import com.landeqing.model.Xian;
import com.landeqing.service.OrderAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class OrderAddressServiceImpl implements OrderAddressService {
    @Autowired
   private OrderAddressDaoImpl orderAddress;

    public OrderAddressDaoImpl getOrderAddress() {
        return orderAddress;
    }

    public void setOrderAddress(OrderAddressDaoImpl orderAddress) {
        this.orderAddress = orderAddress;
    }

    public int save(Address address) {
        return orderAddress.save(address);
    }

    public List<Address> getList() {
        return orderAddress.getList();
    }

    public List<Province> getProvinceList() {
        return orderAddress.getProvinceList();
    }

    public List<City> getCityListById(int p_id) {
        return orderAddress.getCityListById(p_id);
    }

    public List<Xian> getXianListById(int c_id) {
        return orderAddress.getXianListById(c_id);
    }

    public Province getProvinceById(int id) {
        return orderAddress.getProvinceById(id);
    }

    public City getCityById(int id) {
        return orderAddress.getCityById(id);
    }

    public Xian getXianById(int id) {
        return orderAddress.getXianById(id);
    }

    public boolean update(Address address) {
        return orderAddress.update(address);
    }

    public boolean delete(int id) {
        return orderAddress.delete(id);
    }

    public Address getAddressById(int id) {
        return orderAddress.getAddressById(id);
    }
}
